Patt.

Use this screen to define the search pattern. The search pattern comprises a sequence of patterns and logical operations. Each pattern is made of a search string and a list of fields. The pattern is evaluated as true if the search string is found in one of the fields, and false otherwise. The evaluation of the whole search pattern proceeds in a stack oriented (RPN) manner: each pattern is evaluated and pushed into the stack. A logical operation replaces the top stack element by either its inverse ( – NOT) or the operation performed on the top two elements (+ – OR, and * – AND). For example, if one desires to match all entries which have J. Smith as an author, and either do not contain the word ``TeX'' or do contain the word ``Bibliography'' in their title, keywords or abstract fields, one would enter the pattern

``Author: J. Smith'' ``Title+Keywords+Abstract: TeX'' ``Title+Keywords+Abstract: Bibliography'' + *

Actually using the Pattern screen is, I think, self explanatory. Press the relevant keys on the keyboard, or click on them with the mouse. The ``Enter Pattern'' mode can also be entered by clicking with the mouse on the ``Choose Field'' menu, on the right hand side of the screen. The options appearing in the ``Choose Field'' menu are determined in the `` \patternformats'' environment of the configuration file. When choosing a set of fields from the list, you may mark all fields by pressing ``ALT-A'' or ``Ctrl-A'', and clear all fields using ``ALT-C'' or ``Ctrl-C''. Mouse users may also click on ``[all]'' and ``[erase]'', respectively. When entering a search string, note that the string may be up to 255 characters in length, even though the editing window is shorter. The memory registers are also available – use ``ALT-S'' or click on ``[S]'' to save, and use ``ALT-R'' or click on ``[R]'' to recall. If the defined pattern does not fit in the pattern display window, it may be scrolled using the arrow keys, and the `Home' and `End' keys, in the normal fashion. The pattern may be toggled on or off by pressing `O' or clicking on the relevant box with the mouse, and the search may be performed with or without regard to case. Leave the screen by pressing or clicking RETURN (for exit and retain changes) or ESC (for exit and discard changes). Re-entering the Pattern screen lets you continue editing the previously defined pattern.

If a field is designated ``numeric'', there is an additional meaning to search strings. When defining a search string for a numeric field, you can also define a range. For example, ``year: 1991'' will look for entries whose year is 1991, while ``year: 1989-1991'' or ``year: 1989 to 1991'' will look for entries whose year is in the range 1989 to 1991. Fields are designated as ``numeric'' in the configuration file. The fields ``year'' and ``number'' are designated numeric in the supplied configuration file.

Beginning with version 1.3, it is also possible to save and load patterns to and from the disk. Use the `Save/Load' commands for this. The patterns are stored in binary files with the default extension `.ptn'. BibDB searches for the pattern files along the `TexInputs' directory list, and in the current directory. The usual DOS wildcards may also be specified in a pattern file name, in which case you will be prompted to choose from a list of all files found. A pattern that was saved earlier using `Save' can also be loaded into BibDB at startup, by specifying its name following the `/p' command line option.